<?php
class Listas_Form_Elemento extends Form_Cna {
	
		
	public function __construct($options = null) {
		parent::__construct($options);
	}
	
	public function init() {
		$this->setName('info_elemento');
		$this->setMethod("post");
		
		$codlista = new Zend_Form_Element_Hidden("codelementolista");
		$tipolista = new Zend_Form_Element_Hidden("tipolista");
		$codinstitucion = new Zend_Form_Element_Hidden("codinstitucion");
		$elementocna = new Zend_Form_Element_Hidden("elementocna");
		
		$nombre = new Zend_Form_Element_Textarea('texto');
		$nombre->setLabel('Pregunta :');
		$nombre->setRequired(true);
		$nombre->addFilter('StripTags');
		$nombre->addFilter('StringTrim');
		$nombre->setAttrib("rows",2);
		$nombre->setAttrib("cols",60);

		$submit = new Zend_Form_Element_Submit('btnSubmit');
		$submit->setLabel('Guardar');
		$submit->setAttrib("class", "iceCmdBtn");
		
		$submit_asig = new Zend_Form_Element_Submit('btnSubmitAsig');
		$submit_asig->setLabel('Guardar y asignar');
		$submit_asig->setAttrib("class", "iceCmdBtn");
		
		$this->addElements ( array ( $codlista,
		                             $tipolista,
		                             $codinstitucion,
		                             $elementocna,
									 $nombre,
									 $submit,
									 $submit_asig
								 ) );
		
		$this->loadTableDecorators();
		$submit->setDecorators($this->_buttonDecoratorsOpen);
		$submit_asig->setDecorators($this->_buttonDecoratorsClose);
	}
	
}